<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'Home\IndexController@index');

//后台登录页面路由
Route::get('/admin/public/login','Admin\PublicController@login') -> name('login'); //登录页面路由
Route::post('/admin/public/checkLogin','Admin\PublicController@checkLogin'); 
//登录退出路由
Route::get('/admin/public/logout','Admin\PublicController@logout'); //退出登录路由

//后台路由
Route::group(['prefix' => 'admin','middleware' => 'auth:admin'],function(){

	Route::get('index/index','Admin\IndexController@index');//展示后台首页页面
	Route::get('index/welcome','Admin\IndexController@welcome');//展示后台首页页面 
	Route::get('admin/index','Admin\AdminController@index'); //用户展示页面
	Route::any('admin/add','Admin\AdminController@add'); //用户添加页面
	Route::get('admin/del','Admin\AdminController@del'); //用户删除页面
	Route::any('admin/edit','Admin\AdminController@edit'); //用户修改页面
	Route::get('admin/serverSide/{mark?}','Admin\AdminController@serverSide');//展示serverSide展示服务端分页
	Route::any('auth/add','Admin\AuthController@add'); //添加权限
	Route::any('auth/edit','Admin\AuthController@edit'); //编辑权限
	Route::any('auth/index','Admin\AuthController@index'); //权限列表
}); 